﻿using System;
using System.IO;
using System.Windows.Forms;

namespace Bing_Wallpaper_Downloader
{
    internal class Logging
    {
        public static void LogMessage(string message)
        {
            using (TextWriter writer = TextWriter.Synchronized(File.AppendText(Application.ProductName + ".txt")))
            {
                writer.WriteLine("{0} {1}", DateTime.Now, message);

                writer.Flush();
                writer.Close();
            }
        }
    }
}
